Figures, Tables, and Listings
Preface About this BookFigure P-1 Roadmap to the QuickDraw GX suite of books xviii
Chapter 1 Introduction to Printing Extensions and Drivers 1-1
Figure 1-1 A printing message chain 1-5
Table 1-1 Print imaging systems that QuickDraw GX supports 1-6
Figure 1-2 The phases of QuickDraw GX printing 1-8
Figure 1-3 Using multiple extensions concurrently 1-12
Figure 1-4 Several functions handling the GXDespoolPage message 1-13
Chapter 2 Printing Extensions 2-1
Figure 2-1 The background picture panel displayed in the Print dialog box 2-5
Table 2-1 Files used to implement the background picture printing extension 2-7
Figure 2-2 A page printed while the background picture printing extension is active 2-8
Table 2-2 Printing messages overridden by the background picture printing extension 2-9
Listing 2-1 The override resource for the background picture printing extension 2-10
Listing 2-2 The jump table for the background picture printing extension 2-10
Table 2-3 Implementation types for QuickDraw GX printing messages 2-12
Listing 2-3 Forwarding the GXJobPrintDialog message 2-13
Listing 2-4 Using the nrequire macro for exception handling 2-14
Listing 2-5 Using the nrequire_action macro for exception handling 2-15
Listing 2-6 The BWInitialize override function 2-16
Listing 2-7 The InitGlobalData function 2-17
Listing 2-8 The BWJobPrintDialog override function 2-17
Listing 2-9 The BackwashCollection structure 2-18
Listing 2-10 The SetupPrintPanel function 2-18
Listing 2-11 The gxPanelInfoRecord structure 2-20
Table 2-4 Panel events handled by the background picture printing extension 2-21
Listing 2-12 The BWHandlePanelEvent override function 2-22
Listing 2-13 The OpenBackwashPanel function 2-24
Listing 2-14 The BWCreateSpoolFile override function 2-25
Listing 2-15 The AddBackwash function 2-26
Listing 2-16 The BWDespoolPage function 2-28
Listing 2-17 The BWCloseSpoolFile override function 2-31
Listing 2-18 The BWShutDown override function 2-31
Table 2-5 Resource types used to define a printing extension 2-32
Listing 2-19 The QuickDraw GX version resource for the background picture printing extension 2-33
Listing 2-20 The standard version resources for the background picture printing extension 2-34
Listing 2-21 The extension scope resource for the background picture printing extension 2-35
Table 2-6 Identifiers for the extension scope resource 2-35
Listing 2-22 An example of extension scope resources 2-36
Listing 2-23 An example of an extension optimization resource 2-37
Listing 2-24 Override resources for a printing extension 2-38
Listing 2-25 The extension load resource for the background picture extension 2-39
Table 2-7 Loading order constants for an extension 2-39
Figure 3-1 The printing status displayed in a desktop printer window 3-10
Table 3-1 Files used to implement the ImageWriter II printer driver 3-12
Table 3-2 Printing messages overridden by the ImageWriter II printer driver 3-13
Listing 3-1 Two override resources from the ImageWriter II printer driver 3-14
Listing 3-2 The jump table for the ImageWriter II printer driver 3-15
Table 3-3 Message overrides for the LaserWriter IIg printer driver 3-18
Listing 3-3 Overriding the GXRasterLineFeed message 3-19
Figure 3-2 The job collection 3-21
Table 3-4 Tag ID constants for items in the job collection 3-22
Listing 3-4 Initializing the ImageWriter II printer driver 3-24
Listing 3-5 Modifying the default printer object 3-25
Table 3-5 Color values for an eight-color view device for the ImageWriter II printer 3-27
Listing 3-6 Establishing the printing resolution for the ImageWriter II printer 3-28
Listing 3-7 Determining the preferred job-formatting mode 3-29
Listing 3-8 Opening the connection with the printing device 3-30
Listing 3-9 Getting information about the configuration of the printing device 3-31
Listing 3-10 Responding to a query about the job format mode 3-34
Listing 3-11 Setting up the constant data for the print job 3-36
Listing 3-12 Establishing the print quality 3-38
Listing 3-13 Determining if the print job uses any manually fed pages 3-39
Listing 3-14 Finding the manual-feed paper name 3-40
Listing 3-15 Displaying a printing alert box with printer status information 3-42
Listing 3-16 Checking if an alert condition has resolved itself 3-44
Table 3-6 Predefined alert conditions for printing device drivers 3-44
Listing 3-17 Modifying alert information at run time 3-45
Table 3-7 Status text IDs in the page transmission status resource 3-47
Listing 3-18 Terminating the print job 3-48
Table 3-8 PostScript color-space choices 3-52
Table 3-9 Resource types used to define a printer driver 3-53
Listing 3-19 The QuickDraw GX version resource for the ImageWriter II printer driver 3-56
Listing 3-20 Override resources for the ImageWriter II printer driver 3-56
Listing 3-21 The imaging system resource for the ImageWriter II printer driver 3-58
Table 3-10 Imaging system values 3-58
Listing 3-22 Communications resources for the ImageWriter II printer driver 3-59
Listing 3-23 The buffering and input/output preferences resource for the ImageWriter II printer driver 3-60
Listing 3-24 Capture resources for the ImageWriter II printer driver 3-61
Listing 3-25 A status resource for the ImageWriter II printer driver 3-61
Listing 3-26 The customization resource for the ImageWriter II printer driver 3-62
Listing 3-27 The raster preferences resource for the ImageWriter II printer driver 3-63
Listing 3-28 The raster package resource for the ImageWriter II printer driver 3-63
Listing 3-29 The raster package controls resource for the ImageWriter II printer driver 3-64
Listing 3-30 The look resource for the ImageWriter II printer driver 3-66
Figure 3-3 The Apple LaserWriter printer driver icons 3-66
Figure 3-4 The QuickDraw GX desktop-printer status icons 3-68
Figure 3-5 Desktop printer icons showing printer status 3-69
Listing 3-31 The bundle resource for the ImageWriter II printer driver 3-70
Table 3-11 File types for desktop printer icons 3-70
Listing 3-32 The file reference resources for the ImageWriter II printer driver 3-71
Listing 3-33 The icon resources for the ImageWriter II printer driver 3-71
Chapter 4 Printing Messages 4-1
Table 4-1 Status type IDs 4-40
Table 4-2 Communications errors returned by many of the printing messages 4-42
Table 4-3 The actions of the GXSetPrinterProfile message 4-65
Table 4-4 The actions of the GXSetFormatProfile message 4-67
Table 4-5 Options for the GXCreateSpoolFile message 4-68
Table 4-6 GXCloseSpoolFile options 4-80
Table 4-7 Image file options 4-92
Table 4-8 Constants for PostScript query results 4-102
Listing 4-1 Using the GXPostScriptGetPrinterText and GXPostScriptScanPrinterText messages 4-109
Listing 4-2 An example of the GXPostScriptGetDocumentProcSetList message 4-114
Table 4-9 Communications resource types 4-133
Table 4-10 Options for adding data to the buffer 4-140
Chapter 5 Printing Functions for Message Overrides 5-1
Listing 5-1 Looping through the paper trays 5-5
Listing 5-2 Accessing the desktop printer data 5-7
Listing 5-3 The Device function for the ImageWriter II printer driver 5-9
Listing 5-4 Calling the GXCleanupOpenConnection function 5-11
Table 5-1 Messages that the Chooser sends to drivers 5-35
Chapter 6 Printing Resources 6-1
Figure 6-1 The override resource 6-13
Table 6-1 Override resource IDs 6-14
Table 6-2 Printing message constants 6-15
Listing 6-1 An example of an override resource 6-17
Listing 6-2 QuickDraw GX version resources 6-18
Figure 6-2 The status resource 6-19
Table 6-3 Status types 6-20
Listing 6-3 An example of a status resource 6-21
Figure 6-3 The printing alert resource 6-22
Table 6-4 Printing alert versions 6-23
Table 6-5 Icon IDs for a printing alert resource 6-23
Table 6-6 Default button string values for a printing alert resource 6-23
Listing 6-4 An example of a printing alert resource 6-24
Table 6-7 Cancel button string values for a printing alert resource 6-24
Figure 6-4 The tray count resource 6-25
Figure 6-5 The tray name resource 6-25
Figure 6-6 The extension scope resource 6-26
Table 6-8 Imaging system identifiers for the extension scope resource 6-27
Table 6-9 Scope resource identifiers 6-27
Listing 6-5 An example of a pair of extension resources used together 6-28
Figure 6-7 The extension load resource 6-28
Listing 6-6 An example of an extension load resource 6-29
Table 6-10 Extension load priority constants 6-29
Figure 6-8 The extension optimization resource 6-30
Table 6-11 Extension optimization resource flags 6-30
Listing 6-7 An example of an extension optimization resource 6-31
Table 6-12 Resources used only in printer drivers 6-32
Figure 6-9 The imaging system resource 6-33
Listing 6-8 An example of an imaging system resource 6-34
Figure 6-10 The look resource 6-34
Table 6-13 Flag constants for the look resource 6-35
Listing 6-9 An example of a look resource 6-36
Figure 6-11 The serial communications resource 6-37
Table 6-14 Constants for the baud rate 6-38
Table 6-15 Parity constants 6-39
Table 6-16 Constants for stop bits 6-39
Table 6-17 Constants for data bits 6-39
Figure 6-12 Input and output handshaking values 6-40
Listing 6-10 An example of a serial communications resource 6-41
Table 6-18 Handshake error types 6-41
Table 6-19 Status changes that cause driver events to be posted 6-41
Figure 6-13 The PAP communications resource 6-42
Listing 6-11 An example of an AppleTalk communications resource 6-43
Figure 6-14 The PrinterShare communications resource 6-44
Listing 6-12 An example of a PrinterShare communications resource 6-44
Figure 6-15 The SCSI communications resource 6-45
Listing 6-13 An example of a SCSI communications resource 6-46
Figure 6-16 The customization resource 6-47
Table 6-20 Updriver values for the customization resource 6-48
Table 6-21 Translator setting values 6-48
Listing 6-14 An example of a customization resource 6-49
Figure 6-17 The resolution resource 6-50
Listing 6-15 An example of a resolution resource 6-50
Listing 6-16 An example of a print record resource 6-51
Figure 6-18 The dialog control resource 6-53
Table 6-22 Control item types 6-53
Listing 6-17 Two examples of a dialog control resource 6-54
Table 6-23 Cluster type constants for the dialog control resource 6-56
Table 6-24 Frill type constants for the dialog control resource 6-57
Table 6-25 Toggle action-item flags for the dialog control resource 6-59
Figure 6-19 The scaling table resource 6-61
Figure 6-20 The buffering and input/output preferences resource 6-62
Listing 6-18 An example of a buffering and input/output preferences resource 6-63
Figure 6-21 The capture resource 6-63
Table 6-26 Capture resource types 6-64
Table 6-27 Substitution strings for the capture resource 6-64
Listing 6-19 Examples of capture resources for a printer driver 6-65
Figure 6-22 The print file formats resource 6-66
Listing 6-20 An example of a print-file formats resource 6-66
Figure 6-23 The raster preferences resource 6-67
Table 6-28 Raster preference option values 6-70
Table 6-29 Flags used for each plane in the raster preferences resource 6-70
Table 6-30 Plane dithering types 6-71
Table 6-31 Plane tinting types 6-71
Listing 6-21 An example of a raster preferences resource 6-72
Figure 6-24 The raster package resource 6-73
Listing 6-22 An example of a raster package resource 6-74
Table 6-32 Raster package options 6-74
Figure 6-25 The raster package controls resource 6-75
Listing 6-23 An example of a raster package controls resource 6-76
Table 6-33 Number types for specifying line feeds 6-76
Figure 6-26 The color set resource 6-78
Listing 6-24 An example of a color set resource 6-78
Figure 6-27 The PostScript scanning resource 6-79
Table 6-34 Scan string specifications for the PostScript scanning resource 6-80
Table 6-35 Scan offset specifications for the PostScript scanning resource 6-80
Listing 6-25 An example of PostScript scanning resources for a printer driver 6-81
Table 6-36 Scan-action specifications for the PostScript scanning resource 6-81
Figure 6-28 The PostScript procedure set control resource 6-82
Table 6-37 PostScript procedure data flags 6-83
Figure 6-29 The PostScript printer font type resource for the Adobe character set 6-84
Listing 6-26 Examples of PostScript printer font type resources for the Adobe character set 6-84
Figure 6-30 The PostScript printer font type resource for the Apple character set 6-85
Listing 6-27 An example of a PostScript printer font type resource for the Apple character set 6-86
Figure 6-31 The PostScript printer font type resource for an equivalent character set 6-86
Figure 6-32 The PostScript printer font type resource for an encoded font 6-87
Figure 6-33 PostScript preferences resource 6-88
Table 6-38 PostScript render options 6-89
Table 6-39 Font stream types 6-89
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help